package any.incubator;

import any.ImmutableAny;
import any.functor.interfaces.Function2;
import any.functor.interfaces.FunctionN;

//TODO: Unusable, delete?
public class CombineFunction<FR extends Iterable<FR>, TO> implements FunctionN<FR, TO> {

	private final Function2<? super FR, ? super FR, TO> func;

	public CombineFunction(Function2<? super FR, ? super FR, TO> func) {
		this.func = func;
	}
	
	
	public TO apply(FR... from) {
		if (from == null || from.length == 0) {
			return null;
		} else {
			return null;
		}
	}
	public ImmutableAny apply(ImmutableAny... from) {
		if (from.length > 0) {
			for (ImmutableAny any : from) {
				any.toAny();
				func.apply(null, null);
			}
			
			return ImmutableAny.create.any();			
		} else {
			return ImmutableAny.create.any();			
		}
	}

}
